package com.sskj.mine.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.mine.bean.AgentDataBean;
import com.sskj.mine.http.HttpConfig;
import com.sskj.mine.ui.activity.AgentManagerActivity;


public class AgentManagerActivityPresenter extends BasePresenter<AgentManagerActivity> {

    public void getAgentData() {
        httpService.getAgentData()
                .execute(new JsonCallBack<HttpData<AgentDataBean>>() {
                    @Override
                    public void onSuccess(Response<HttpData<AgentDataBean>> response) {
                        HttpData<AgentDataBean> httpData = response.body();
                        if (httpData.getStatus() == HttpConfig.OK) {
                            mView.updataUI(httpData.getData());
                        }
                    }
                });
    }
}
